-
Notifications
You must be signed in to change notification settings - Fork 138
fix: Resolve multiple exporter failures after database migration #1321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: enext
Are you sure you want to change the base?
fix: Resolve multiple exporter failures after database migration #1321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @ArnavBallinCode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
mariobehling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes multiple exporter failures that occurred after a database migration changed the item field to product throughout the codebase. The changes address field reference errors, undefined settings, missing form data defaults, invalid query syntax, and inadequate handling of empty data scenarios.
- Updates field references from
itemtoproductacross all affected exporters - Adds defensive programming for form data access and empty data scenarios
- Fixes Django ORM query syntax errors
- Improves error handling in export services
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| app/eventyay/plugins/ticketoutputpdf/exporters.py | Adds handling for empty ticket exports by tracking any_tickets flag |
| app/eventyay/plugins/reports/exporters.py | Adds defensive checks for num data access to prevent KeyError on empty reports |
| app/eventyay/plugins/checkinlists/exporters.py | Updates item → product field references and adds form_data defaults |
| app/eventyay/plugins/badges/exporters.py | Relocates empty badge check before PDF write operation |
| app/eventyay/config/settings.py | Defines missing JSON_FIELD_AVAILABLE setting |
| app/eventyay/base/services/export.py | Enhances error handling with generic exception catch and user-friendly messages |
| app/eventyay/base/exporters/waitinglist.py | Updates field references and fixes indentation in row construction |
| app/eventyay/base/exporters/orderlist.py | Updates field references and adds form_data.get() defaults |
| app/eventyay/base/exporters/json.py | Updates items → products and item_id → product_id references |
| app/eventyay/base/exporters/dekodi.py | Fixes invalid Django query syntax from state= to state__in= |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
After PR #1258 fixed the export page HTTP 500 error, This pr fixes issue #1282 , export functionality which was broken for some of the exporters
Issues found and fixed
itemfield instead of newproductfieldJSON_FIELD_AVAILABLEsetting was undefinedRelated Issues